// 子弹清理插件
string author = "Live";
string pluginName = "AmmoClean 子弹清理 插件";
string version = "1.0";

void OnPluginInit()
{
    // 设置插件信息
    PluginData::SetAuthor(author);
    PluginData::SetName(pluginName);
    PluginData::SetVersion(version);
    // 提示
	ThePresident.InfoFeed("插件:"+pluginName+"| 版本:"+version+"| 作者:"+author,false);

    // 实体掉落
    Events::Player::OnEntityDropped.Hook( @OnEntityDropped );
}

// 实体掉落
HookReturnCode OnEntityDropped(CTerrorPlayer@ pPlayer, CBaseEntity@ pEntity)
{
    removeDropAmmo(pEntity);
	return HOOK_CONTINUE;
}

// 清除掉落子弹
void removeDropAmmo(CBaseEntity@ pEntity){
    if(pEntity.ClassnameIs("item_ammo_*")){
        pEntity.SUB_Remove();
    }
}